package com.chat.websocket.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chat.websocket.entity.module.Friend;
import com.chat.websocket.entity.vo.FriendListVO;
import com.chat.websocket.entity.vo.ChatListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * SunJingxuan
 * 2022 \ 08 \ 09
 */
public interface FriendMapper extends BaseMapper<Friend> {

	List<FriendListVO> searchUserFriend(@Param(value = "userId")Integer userId);

	List<ChatListVO> searchUserChatList(@Param(value = "userId")Integer userId, @Param(value = "userNickname")String userNickname);

	void changeToTopStatus(@Param(value = "userId") Integer userId, @Param(value = "friendUserId") Integer friendUserId);

	void changeChatListDeleteStatus(@Param(value = "userId") Integer userId, @Param(value = "friendUserId") Integer friendUserId);

	void updateChatListDeleteStatus(@Param(value = "userId")Integer userId, @Param(value = "friendUserIdList")List<Integer> friendUserIdList);

	List<ChatListVO> searchFriend(@Param(value = "userId")Integer userId, @Param(value = "userNickname")String userNickname);
}
